<template>
  <div class="app-container">
      <el-radio-group v-model="labelPosition" size="small">
  <el-radio-button label="left">左对齐</el-radio-button>
  <el-radio-button label="right">右对齐</el-radio-button>
  <el-radio-button label="top">顶部对齐</el-radio-button>
</el-radio-group>
<div style="margin: 20px;"></div>
<el-form :label-position="labelPosition" label-width="80px" :model="bed">
  <el-form-item label="床位ID">
    <el-input v-model="bed.id" readonly=""></el-input>
  </el-form-item>
  <el-form-item label="所属医院">
    <el-input v-model="bed.hosName" readonly=""></el-input>
  </el-form-item>
  <el-form-item label="所属科室">
    <el-input v-model="bed.hosTypeName" readonly=""></el-input>
  </el-form-item>
   <el-form-item label="床位编号">
    <el-input v-model="bed.bedCode" readonly=""></el-input>
  </el-form-item>
   <el-form-item label="床位状态">
    <el-input v-model="bed.status" readonly=""></el-input>
  </el-form-item>
   <el-form-item label="设备型号">
    <el-input v-model="bed.unitType" readonly=""></el-input>
  </el-form-item>
   <el-form-item label="设备厂家名称">
    <el-input v-model="bed.manufacturerAddress" readonly=""></el-input>
  </el-form-item>
   <el-form-item label="厂家联系人名称">
    <el-input v-model="bed.manufacturerLxr" readonly=""></el-input>
  </el-form-item>
   <el-form-item label="录入人">
    <el-input v-model="name" readonly=""></el-input>
  </el-form-item>
  <el-form-item label="录入人电话">
    <el-input v-model="phone" readonly=""></el-input>
  </el-form-item>
  <el-form-item label="录入时间">
    <el-input v-model="bed.addTime" readonly=""></el-input>
  </el-form-item>
</el-form>

  </div>
</template>

<script>
export default {
 data() {
      return {
        labelPosition: 'right',
        bed: {
          id: '',
          hosName: '',
          hosTypeName: '',
          bedCode: '',
          status: '',
          unitType: '',
          manufacturerAddress: '',
          manufacturerLxr: '',
          addTime: ''
        },
        name: '',
        phone: '',
        url:`http://localhost:8080/jiapei/bed/bed`
      };
    },
    mounted(){
      this.showBed();
    },
    methods:{
      showBed(){
        var bid = this.$route.params.id;
        this.$axios({
          methods:"GET",
          url:this.url+`/${bid}`
        }).then(res=>{
          this.bed=res.data.data.bed.bed;
          this.name=res.data.data.bed.name;
          this.phone=res.data.data.bed.phone;
        })
      }
    }
}
</script>

<style>

</style>